<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html">

<h:body>

	<p:outputPanel autoUpdate="true" id="Logotype">
		<p:panelGrid style="border-style:hidden">
			<p:row>
				<p:column style="border-style:hidden">
					<c:if test="#{!orderAdd.logotypeExists()}">
						<p:fileUpload id="upload"
							fileUploadListener="#{orderAdd.handleLogotypeUpload}"
							mode="advanced" multiple="false" label="Add sketch"
							showButtons="false" auto="true"
							allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
							invalidFileMessage="Invalid file"
							invalidSizeMessage="Invalid file size" sizeLimit="1000000"
							required="true">
						</p:fileUpload>
					</c:if>
				</p:column>

				<c:if test="#{orderAdd.logotypeExists()}">
					<p:column style="border-style:hidden">
						<br />
						<p:commandLink value="#{orderAdd.orderDraft.orderName}"
							ajax="false" immediate="true">
							<p:fileDownload value="#{orderAdd.getBufferDownloadFile()}" />
						</p:commandLink>
					</p:column>
					<p:column style="border-style:hidden">
						<p:commandButton value="Reset logotype"
							action="#{orderAdd.resetLogotype()}" ajax="false"
							immediate="true" />
					</p:column>
				</c:if>
				<p:column style="border-style:hidden">
					<p:commandButton value="?"
						style="font-size:50%; vertical-align:55%" immediate="true" />
				</p:column>
			</p:row>
		</p:panelGrid>
	</p:outputPanel>

</h:body>
</html>